<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
	<link href="ressources/css/css.css" rel="stylesheet">
	<title>Hé ! Lisez-moi !</title>
</head>
<body>
	<c:if test="${accueil == 'true'}">
		<h1>Article en vedette:</h1>
		<br/>
	</c:if>
	<img id="imgArticle" alt="${article.titre }" src="./ressources/img/articles/${article.image }">
	<div id="descriptionArticle">
		<h1><c:out value="${article.titre }"/></h1>
		écrit par <c:out value="${article.auteur }"></c:out>
		<span id="prix">
			<c:out value="${article.prix }"></c:out> &euro;
		</span>
		<div id="resume">
			<c:out value="${article.description }"></c:out>
		</div>
<!-- 
		<div id="comboBoxNbArticle">
			Quantité : 
			<input  type="text" list="nbArticle" style="width:20px;">
			<datalist id="nbArticle">
				<option>1</option>
				<option>2</option>
				<option>3</option>
				<option>4</option>
				<option>5</option>
				<option>6</option>
				<option>7</option>
				<option>8</option>
				<option>9</option>
				<option>10</option>
			</datalist>
		</div>
-->
		<c:forEach items="${sessionScope.panier}" var="articlePanier">
   			<c:if test="${articlePanier.id == article.id}">
        		<c:set var="found" value="true" scope="request" />
   			</c:if>
		</c:forEach>
		<c:if test="${!found }">
			<div class="nettoyage"></div>
			<a id="ajouterAuPanierLogo" href="AjoutPanier.do?id=${article.id }">
				<img alt="Ajouter au panier" src="./ressources/img/design/ajouterAuPanier.jpg">
			</a>
		</c:if>
		
	</div>
	<div class="nettoyage"></div>
</body>
</html>